<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h2 style="color: #ffc600"
    class="page-header">{{b.author}}的个人中心</h2>
<table border="1" width="70%" style="text-align: center">
    <caption>作品列表</caption>
    <tr>
        <th>序号</th>
        <th>标题</th>
        <th>作者</th>
        <th>图片</th>
        <th>时间</th>
        <th>操作</th>
    </tr>
    <tr v-for="(b,i) in p_arr">
        <td>{{i+1}}</td>
        <td>{{b.title}}</td>
        <td>{{b.author}}</td>
        <td><img :src="b.url" width="50" alt=""></td>
        <td>{{b.created}}</td>
        <td><a href="#" @click="del(b.id)">删除</a></td>
    </tr>
</table>
<!--引入vue-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!--引入axios-->
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<script>
    let vm=new Vue({
        el:"",
        data:{
        },
        methods: {
            del: function (id) {
                if (confirm("您确认删除吗?")) {
                    axios.get("/boke/delete?id=" + id).then(function () {
                        location.reload();//刷新页面
                    })
                }
            }
        }
    })

</script>
</body>
</html>